﻿using System.ComponentModel;
using System.Data;
using System.Windows;
using System.Windows.Controls;
using WPFExcelReport;
using WPFExcelReport.Helpers;
namespace WPFExcelReport
{
    public partial class TSAM02
    {

        public TSAM02()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            MV = new VAMSTAMM();
            this.DataContext = MV;
            InitializeComponent();
        }  
        public override void LOADALL()
        {
            if (Counts > 0)
                return;
            SResult = TMV.LOADAM02(KSTKRS, KST, AMTYP);
            MergeData(SResult, false, true);
        }
        public override void vwMaster_CurrentChanged(object sender, System.EventArgs e)
        {
            base.vwMaster_CurrentChanged(sender, e); 
        }
        public override void OnEXAUFChg(string vlaue)
        {
            if (vlaue == "")
                return;
            LOADALL();
            Locate("AMBDEMA", vlaue.PadRight(8).Substring(0,8));
            base.OnEXAUFChg(vlaue);
        }
        public override void ManageCommand(object sender, RoutedEventArgs e)
        {
            if (!IsManage)
            {
                VICC_WFEVENTS.SVWF.AM02(this.RUNID);
            }

            base.ManageCommand(sender, e);
        }

    }
}